<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
<script src='http://cdn.jsdelivr.net/vue/1.0.26/vue.js'></script>
<script src='https://cdn.jsdelivr.net/vue.router/0.7.10/vue-router.min.js'></script>
<div id="root">
	 <input type="text" v-model="message">
	 <button v-on:click="greet">Greet</button>
	 <!-- v-on指令可以缩写为@符号-->
	 <button @click="greetAgain">Greet Again</button>
</div>
<script>
	var vm = new Vue({
		el : '#root',
		data : {
			Greet : 'Greet',
			GreetAgain : 'GreetAgain',
			message : '你好啊'
		},
		methods : {
			greet(){
				alert(this.message);
			},
			greetAgain(){
				alert(this.message);
			}
		}
	});
</script>	
</body>
</html>